<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Delete User</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
</head>
<body>
<div id="bg">
<div id="logo">
<img src="images/logo_and_name.png" alt="" width="305" height="78" />
</div>
<div id="main">
<div id="out"><h3><p align="right"><a href="index3.php">Home</a>&nbsp;&nbsp;|<a href="logout.php">logout</a></p></h3></div>
<!-- header begins -->
<div id="header">	
	
	<div id="slider-wrapper">        
					             <div id="slider" class="nivoSlider">
									<img src="images/header.jpg" alt="" title="" />
									<img src="images/header2.jpg" alt="" title="" />
									<img src="images/header3.jpg" alt="" title="" />
									<img src="images/header4.jpg" alt="" title="" />								
                                   	
		</div>        
      </div>
								
<script type="text/javascript" src="lib/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="lib/jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>
	
    <script language="JavaScript">
function validate(){
if ((document.form2.userid.value=="") || (document.form2.lastname.value=="") ||(document.form2.firstname.value=="") ||(document.form2.password.value=="") ||(document.form2.emailadress.value==""))
{
window.alert("Please Enter Important Informations!");
return false;
}
 else
 {
 return true;
 }
}


</script>

</div>
        <div id="buttons">
		<ul>
			<li class="first"><a href="index3.php"  title="">Home</a></li>
            <li><a href="UserList.php" title="">User List</a></li>
			<li><a href="listofbusinessApp.php" title="">Business Permit</a></li>
			<li><a href="real_property.php" title="">Real Property</a></li>
			
			<li><a href="#" title="">Contact</a></li>
		</ul></div>
<!-- header ends -->
<!-- content begins -->
<div id="content_bg">
    <div id="column_box">
      <div id="bg_left"></div>
      <div id="column1">
        <h2>Your Options</h2>
							<img src="images/img1.png" alt="" title="" style="float: left; padding-right: 20px;"/>
							<p><a href="#">Cras hendrerit est nec libero ornare sagittis. </a> <br />
Donec interdum dignissim risus et vestibulum. 
</p>
      </div>
      <div id="column2">
        <h2>Company News</h2>
							<img src="images/img2.png" alt="" title="" style="float: left; padding-right: 20px;"/>
							<p><a href="#">Donec interdum dignissim risus et vestibulum.  </a>   <br />
Donec eget nisi id magna tempor laoreet. Etiam egesa </p>
      </div>
      <div id="column3">
       <h2>Have a Question?</h2>
							<img src="images/img3.png" alt="" title="" style="float: left; padding-right: 20px;"/>
							<p><a href="#">Cras hendrerit est nec libero ornare sagittis. </a>  <br />
Donec interdum dignissim risus et vestibulum. </p>
      </div></center>
      <div id="bg_right"></div>
      <div class="clear"></div>
    </div>
   <div class="container">
    	<div class="box">
          	<div class="inside">
          	  <div class="row-2">
              <center>
              <a href="Userlist.php"><font colot="#ffffff"><strong>back to user list page</strong></font></a>

              
               <font size="5"><strong><h3>DELETE USER</h3></strong></font>
     
        
        <?php 
     

    
 	$db_name = "business-is";
	$table_name = "user";

	$user = "root";
	$pass = "";
	
	$connection = mysql_connect("localhost","$user","$pass")
	or die(mysql_error());

	$db = mysql_select_db($db_name, $connection) or die(mysql_error());
	
	$sql = "DELETE FROM $table_name WHERE userid = '$_GET[userid]'";

	$result = mysql_query($sql, $connection) or die(mysql_error());
   
	
	echo "<b><center>DELETED SUCESSFULLY!!!!</center></b>";
  
?>

        </center>

            
              	<div class="wrapper"></div>
              </div>
        </div>
      </div>
    </div>

</div>
<!-- content ends -->
<!-- footer begins -->
<div id="footer">
   <a href="http://validator.w3.org/check?uri=referer">Copyrights © 2012</a> | <a href="http://guinobatan.gov.ph/index.php/guinobatan/index">Municipality of Guinobatan</a>. | All rights reserved. 
      </p></div>
<!-- footer ends -->
</div>
</div>
</body>
</html>